package com.jeeplus.modules.web.mapper;

import com.jeeplus.core.persistence.BaseMapper;
import com.jeeplus.core.persistence.annotation.MyBatisMapper;
import com.jeeplus.modules.web.entity.YjScoreRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 十戒丶
 * @date 2021-01-21 21:27:31
 */
@MyBatisMapper
public interface YjScoreRecordMapper extends BaseMapper<YjScoreRecord> {
    
    List<YjScoreRecord> scoreTotal(@Param("roomFlag") String roomFlag, @Param("roomNumber") String roomNumber);
    List<YjScoreRecord> scoreTotalS(@Param("roomFlag") String roomFlag, @Param("roomNumber") String roomNumber);

    List<YjScoreRecord> getCostTotal(@Param("roomFlag") String roomFlag, @Param("roomNumber") String roomNumber,@Param("pageNum")int pageNum,@Param("pageSize")int pageSize);
    
    List<YjScoreRecord> getScoreDetail(@Param("roomFlag") String roomFlag, @Param("roomNumber") String roomNumber,@Param("roomUser")String roomUser,@Param("gamesCount")String gamesCount,@Param("pageNum")int pageNum,@Param("pageSize")int pageSize);
    List<YjScoreRecord> getScoreDetailS(@Param("roomFlag") String roomFlag, @Param("roomNumber") String roomNumber,@Param("roomUser")String roomUser,@Param("gamesCount")String gamesCount,@Param("pageNum")int pageNum,@Param("pageSize")int pageSize);

    List<YjScoreRecord> findUrl(@Param("roomFlag") String roomFlag, @Param("roomNumber") String roomNumber);

    List<YjScoreRecord> findByRoomFlagAndGamesCount(@Param("roomFlag") String roomFlag, @Param("gamesCount") String gamesCount);

    List<YjScoreRecord>  getCostTotalByRoom(@Param("roomFlag") String roomFlag, @Param("roomNumber") String roomNumber);

    List<YjScoreRecord>  findGamesCount(@Param("roomFlag") String roomFlag,@Param("roomUser")String roomUser);
    List<YjScoreRecord>  findCount(@Param("roomFlag") String roomFlag, @Param("roomNumber") String roomNumber,@Param("pageNum")int pageNum,@Param("pageSize")int pageSize);
    List<YjScoreRecord>  findDate(@Param("roomFlag") String roomFlag, @Param("roomNumber") String roomNumber);
    List<YjScoreRecord>  findByDate(@Param("roomFlag") String roomFlag, @Param("roomNumber") String roomNumber, @Param("createDate")String createDate);
    List<YjScoreRecord>  findByGamesCount(@Param("roomFlag") String roomFlag, @Param("roomNumber") String roomNumber, @Param("gamesCount")String gamesCount);

    void updateScoreInfo(YjScoreRecord yjScoreRecord);
    
    List<YjScoreRecord> queryCurGamesNum(@Param("roomFlag") String roomFlag);
    Integer maxCurGamesNum(@Param("roomFlag") String roomFlag);

    YjScoreRecord getWinRate(@Param("roomFlag") String roomFlag,@Param("roomUser")String roomUser);

    YjScoreRecord getTotalScoreByCount(@Param("roomFlag") String roomFlag, @Param("roomNumber") String roomNumber, @Param("gamesCount")String gamesCount);
}
